#include<iostream.h>
#include"matrix.h"

int main()
{
	int x,n,ch;

	do
	{
		cout<<"\n\t\t M A I N    M E N U";
		cout<<"\n\t 1.  JACOBI ROTATION";
		cout<<"\n\t 2.  GIVENS METHOD";
		cout<<"\n\t 3.  HOUSEHOLDER METHOD";
		cout<<"\n\t 4. EXIT";

		cout<<"\n\t Enter Your Choice : ";
		cin>>n;

		switch(n)
		{
				 
			case 1 : {
				 cout<<"\n Enter order of matrix(nxn) : ";
				 cin>>x;

				 matrix A(x,x);
                                 
				 gen_matrix(A);
				 A.jacobi_rotate();

				 break;
				 }

			case 2 : {
				 cout<<"\n Enter order of matrix(nxn) : ";
                                 cin>>x;

                                 matrix A(x,x);
                                 
				 gen_matrix(A);
                                 A.givens();
					
				 break;
				 }

			case 3 : {
				 cout<<"\n Enter order of matrix(nxn) : ";
                                 cin>>x;

                                 matrix A(x,x);
                                 
				 gen_matrix(A);
                                 A.householder();
					
				 break;
				 }

			case 4 : cout<<"\n Terminated Successfully...\n";


		}
	}while(n!=4);
	
	return 0;
}
